﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using ServicesComponent.Repositories.Core;
using Business_Objects;
using Data_Objects;
namespace ServicesComponent.Repositories
{
    ///// <summary>
    ///// Nationalitie Repository. Good example of CRUD operations.
    ///// </summary>
    public class NationalitieRepository : INationalitieRepository
    {
        private static readonly INationalitieDao _nationalitie = DataAccess.NationalitieDao;
        public List<Nationalitie> GetList()
        {
            return _nationalitie.GetNationalitie().ToList();
        }

        public Nationalitie Get(string id)
        {
            return _nationalitie.GetNationalitieByID(id);
        }

        public void Insert(Nationalitie t)
        {
            _nationalitie.InsertNationalitie(t);
        }

        public void Update(Nationalitie t)
        {
            _nationalitie.UpdateNationalitie(t);
        }

        public void Delete(Nationalitie t)
        {
            _nationalitie.DeleteNationalitie(t);
        }
    }
}